import { axios } from '@/utils/request'

/**
 * 查询DEMO列表
 * @param query
 * @returns {*}
 */
export function pageDemo(query) {
  return axios({
    url: '/workflow/demo/page',
    method: 'get',
    params: query
  })
}

/**
 * 查询DEMO详细
 * @param demoId
 * @returns {*}
 */
export function getDemo(demoId) {
  return axios({
    url: '/workflow/demo/' + demoId,
    method: 'get'
  })
}

/**
 * 新增DEMO
 * @param data
 * @returns {*}
 */
export function addDemo(data) {
  return axios({
    url: '/workflow/demo',
    method: 'post',
    data: data
  })
}

/**
 * 修改DEMO
 * @param data
 * @returns {*}
 */
export function updateDemo(data) {
  return axios({
    url: '/workflow/demo',
    method: 'put',
    data: data
  })
}

/**
 * 删除DEMO
 * @param demoId
 * @returns {*}
 */
export function delDemo(demoId) {
  return axios({
    url: '/workflow/demo/' + demoId,
    method: 'delete'
  })
}
